package com.lbt.javaSE.jianzhioffer;

public class JZ6 {
    public static void main(String[] args) {
        int [] array=new int[]{3,4,5,1,2};
        int number = new JZ6().minNumberInRotateArray(array);
        System.out.println(number);
    }
    public int minNumberInRotateArray(int [] array) {
        if(array.length==0) return 0;
        int index=0;//标记 元素的逆反位置
        for(int i=0;i<array.length && index++<array.length;i++){
            if(array[i]>array[index]) return array[index];
        }
        return 0;
    }
}
